#from question import Question(只引入QUESTION)
#imoprt question (整個QUESTION.py引入)
from question import Question
test = [
"1+1=?\n(a) 2\n(b) -2\n(c) 媽媽咪呀~我肚子餓了\n\n",
"等邊三角形的三角和?\n(a) 90度~我左看右看怎麼都不奇怪\n(b) 180度~歡樂的角度\n(c) 360度~旋轉與跳躍\n\n",
"小白兔是甚麼顏色?\n(a) 我沒看過怎麼知道\n(b) 大便色~因為黑熊嘿嘿\n(c) 白色~阿就告訴你是小白兔了阿\n\n"
]
questions = [
Question(test[0],"a"),
Question(test[1],"b"),
Question(test[2],"c")
]
def run_test(questions):
score = 0
for question in questions:
answer = input(question.description)
if answer == question.answer:
score += 1
print("你獲得" + str(score) + "分,共" + str(len(questions)) +"題")
run_test(questions)